<a class="btn btn-primary btn-block" (click)="openModal();">
  Save Query
</a>
<!-- Modal -->
<div class="modal fade" id="saveQueryModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title" id="myModalLabel">Save Query</h4>
      </div>
      <div class="modal-body">
        <form name="queryForm" novalidate>
          <div class="form-group">
              <label>Name</label>
              <input type="text" name="name" class="form-control" [(ngModel)]="query_info.name" required>
              <!-- <p [hidden]="!user.name" class="help-block">You name is required.</p> -->
          </div>
          <div class="form-group">
              <label>Tag</label>
              <input type="text" name="tag" class="form-control" [(ngModel)]="query_info.tag">
              <!-- <p [hidden]="!user.name" class="help-block">You name is required.</p> -->
          </div>
        </form>  
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-default btn-primary" (click)="save();">Save</button>
      </div>
    </div>
  </div>
</div>